name: Code Review

permissions:
  contents: read
  pull-requests: write

on:
  pull_request:
    types: [opened, reopened, synchronize]
    branches:
      - 'code-review'

jobs:
  chatgpt_code_review:
    runs-on: ubuntu-latest
    steps:
      - name: ChatGPT Code Review
        uses: anc95/ChatGPT-CodeReview@main
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
          LANGUAGE: English
          top_p: 1
          temperature: 1
